package com.ruoyi.front.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.front.mapper.SWebMenuInfoMapper;
import com.ruoyi.front.domain.SWebMenuInfo;
import com.ruoyi.front.service.ISWebMenuInfoService;
import com.ruoyi.common.core.text.Convert;

/**
 * webMenuInfoService业务层处理
 * 
 * @author jyp
 * @date 2021-07-25
 */
@Service
public class SWebMenuInfoServiceImpl implements ISWebMenuInfoService 
{
    @Autowired
    private SWebMenuInfoMapper sWebMenuInfoMapper;

    /**
     * 查询webMenuInfo
     * 
     * @param id webMenuInfoID
     * @return webMenuInfo
     */
    @Override
    public SWebMenuInfo selectSWebMenuInfoById(String id)
    {
        return sWebMenuInfoMapper.selectSWebMenuInfoById(id);
    }

    /**
     * 查询webMenuInfo列表
     * 
     * @param sWebMenuInfo webMenuInfo
     * @return webMenuInfo
     */
    @Override
    public List<SWebMenuInfo> selectSWebMenuInfoList(SWebMenuInfo sWebMenuInfo)
    {
        return sWebMenuInfoMapper.selectSWebMenuInfoList(sWebMenuInfo);
    }

    /**
     * 新增webMenuInfo
     * 
     * @param sWebMenuInfo webMenuInfo
     * @return 结果
     */
    @Override
    public int insertSWebMenuInfo(SWebMenuInfo sWebMenuInfo)
    {
        sWebMenuInfo.setCreateTime(DateUtils.getNowDate());
        return sWebMenuInfoMapper.insertSWebMenuInfo(sWebMenuInfo);
    }

    /**
     * 修改webMenuInfo
     * 
     * @param sWebMenuInfo webMenuInfo
     * @return 结果
     */
    @Override
    public int updateSWebMenuInfo(SWebMenuInfo sWebMenuInfo)
    {
        return sWebMenuInfoMapper.updateSWebMenuInfo(sWebMenuInfo);
    }

    /**
     * 删除webMenuInfo对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSWebMenuInfoByIds(String ids)
    {
        return sWebMenuInfoMapper.deleteSWebMenuInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除webMenuInfo信息
     * 
     * @param id webMenuInfoID
     * @return 结果
     */
    @Override
    public int deleteSWebMenuInfoById(String id)
    {
        return sWebMenuInfoMapper.deleteSWebMenuInfoById(id);
    }
}
